import type { LawyerCategoryItem, LawyerDefaultText, LawyerServiceItem, LawyerServiceResponse, ServiceDetailExplain } from './types/consult'
import { http } from '@/http/alova'

export function fetchTextConsultList() {
  return http.Post<LawyerServiceItem[]>('/api/v1/home/textConsult')
}
export function fetchLawyerByRank(type?: string) {
  return http.Post<LawyerServiceResponse>('/api/v1/home/lawyerByRank', { type })
}
export function fetchServiceType(lawyerId: number) {
  return http.Post<LawyerDefaultText[]>('/api/v1/home/service-type', { lawyerId })
}
export function fetchFirstType() {
  return http.Post<LawyerCategoryItem[]>('/api/v1/tel/first-type')
}
export function fetchTelephoneConsultDetail() {
  return http.Post<ServiceDetailExplain>('/api/v1/tel/detail')
}
